package com.ocom.common.util;

public enum RelationType {
    MAPPING(0,"映射"),
    QUOTE(1,"引用/授权"),
    ENTRUST(2,"委托"),
    AGENT(3,"代理");
    private int value;
    private String desc;
    RelationType(int value ,String desc) {
        this.value = value;
        this.desc = desc;
    }
    public int getValue() {
        return value;
    }
    public String getDesc() {
        return desc;
    }
    public static String getDescByValue(int value) {
        for (RelationType enums : RelationType.values()) {
            if (enums.getValue() == value) {
                return enums.getDesc();
            }
        }
        return "";
    }
}
